|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
september 2013 doc id 16081 rev 2 1/24 AN3018 application note developing self tests for spc564ax introduction spc564ax devices have been designed for powertrain applications like engine control and transmission. as these safety applications increasingly need to conform to safety standards like iec51608 or iso26262, there is a focus on self tests possible on each of the components of these ecus, including the microcontroller. this application note shows how to define and design self tests for spc564ax. after an introduction to self tests, the application note is focused initially on self tests for the cpu subsystem, then on those on digital peripherals and finally on those on analog peripherals. www.st.com
contents AN3018 2/24 doc id 16081 rev 2 contents 1 introduction to self tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.1 self tests for spc564ax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2 designing software self tests fo r spc564ax . . . . . . . . . . . . . . . . . . . . . 7 2.1 spc564ax crc unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.2 explicit and implicit self tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3 self tests for spc564ax core subsystem . . . . . . . . . . . . . . . . . . . . . . . 10 3.1 flash self tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.1.1 flash integrity check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.1.2 flash ecc logic check1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.1.3 flash ecc logic check2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.1.4 flash ecc logic check3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.1.5 flash address decoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.1.6 flash margin mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.2 ram self tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.2.1 ram dormant fault check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.2.2 ram ecc logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.2.3 ram address decoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.2.4 etpu code ram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.3 cpu parallel signature unit tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 4 self tests for spc564ax digital peripherals . . . . . . . . . . . . . . . . . . . . . 15 4.1 crc unit self tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 4.1.1 crc computing circuitry check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 4.2 dma controller self tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 4.2.1 dma transfer logic check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 4.3 crossbar self tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 4.4 memory protection self tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 4.5 peripheral bridge self tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 4.6 peripheral configuration self tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 4.6.1 peripheral configuration check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 4.7 interrupt controller self tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 AN3018 contents doc id 16081 rev 2 3/24 4.7.1 interrupt controller logic check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.8 flexcan self tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.8.1 flexcan check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.9 esci self tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.9.1 esci loop back . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.10 emios self tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.10.1 emios check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.11 decimation filter self tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 4.11.1 decimation filter check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 4.12 eqadc logic self tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 4.12.1 eqadc effective conversion timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 4.13 summary for digital peripherals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 5 self tests for spc564ax analog peripherals . . . . . . . . . . . . . . . . . . . . . 20 5.1 oscillator self tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5.1.1 oscillator check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5.2 fmpll self tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5.2.1 fmpll check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5.3 eqadc self tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5.3.1 eqadc internal reference check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5.3.2 analog input and adc mux check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5.3.3 analog input and adc mux check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5.4 supply monitor self tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 5.4.1 1.2 v monitor check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 5.4.2 monitor check using eqadc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 5.5 summary for analog peripherals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 appendix a document management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 a.1 reference documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 list of tables AN3018 4/24 doc id 16081 rev 2 list of tables table 1. self tests for digital peripherals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 table 2. self tests for analog peripherals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 table 3. document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 AN3018 list of figures doc id 16081 rev 2 5/24 list of figures figure 1. crc unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 figure 2. parallel signature unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 introduction to self tests AN3018 6/24 doc id 16081 rev 2 1 introduction to self tests self tests can be used at two times of a safety application: at power on during run time power on self tests focus on latent fault detection. they usually cover all modules of a given microcontroller. run time self tests focus on single point of fa ilure detection during the application safety time. additionally, some modules may require a specific run time check (for example, adc monitor) to be done during run time, so that the fit rate can be guaranteed on those modules. 1.1 self tests for spc564ax the application note is focused on describing th e possible self tests that can be designed for spc564ax. the description given is intended to provide for different uses according to application requirements, such as power on or as run time self tests. AN3018 designing software self tests for spc564ax doc id 16081 rev 2 7/24 2 designing software self tests for spc564ax spc564ax devices have been designed using th e latest test techniques. hence, they include several bists for logic and for memories (rams, flashes). although those bists cannot be activated by software, spc564ax devices have several hardware features enabling the design of fast and efficient self tests. 2.1 spc564ax crc unit the crc unit allows the design of several self tests. when combined with the use of edma, the self tests can be implemented without cpu load. this method is described in a specific application note. the figure below illustrates the princi ple of this method and shows concurrent accesses between cpu software using ram and flash together with the edma and crc unit. designing software self tests for spc564ax AN3018 8/24 doc id 16081 rev 2 figure 1. crc unit note: the crc unit has 3 independent contexts to allow independent crc computing from cpu side (for example, adding applicable crc to data) and from edma. $ ' & $ q d o r j w r ' l j l w d o & |